package com.jiukuaidao.library.widget.recyclerview.ref.impl;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;

import com.jiukuaidao.library.widget.recyclerview.ref.impl.header1.LoadingMoreFooter;

/**
 * @author BinarySatan
 *         <p></p>
 */
public class RefreshHeader extends BaseRefreshHeader {
    private ImageView mTv;
    LoadingMoreFooter header;
    public RefreshHeader(Context context) {
        super(context);
        initView();
    }

    private void initView() {
//        mTv = (ImageView) findViewById(R.id.tv);
    }

    @Override
    public View getContainerView(LayoutInflater inflater) {
        header = new LoadingMoreFooter(getContext());
        return header;
    }

    @Override
    public void setState(int state) {
        header.setState(state);
//        switch (state) {
//            case IRefreshHeader.STATE_NORMAL:
////                mTv.setText("下拉刷新");
//                header.setState(state);
//                break;
//            case IRefreshHeader.STATE_RELEASE_TO_REFRESH:
////                mTv.setText("释放刷新");
//                break;
//            case IRefreshHeader.STATE_REFRESHING:
////                mTv.setText("正在刷新");
//                break;
//            case IRefreshHeader.STATE_DONE:
////                mTv.setText("刷新完成");
//                break;
//        }

        mState = state;
    }

    @Override
    public View getRootView() {
        return this;
    }
}
